<template>
    <basic-container>
        <TitleComponent mainTitle="抽奖记录" subTitle="列表" />
        <avue-crud :option="option" :table-loading="crudData.loading" :data="crudData.data" :page.sync="crudData.page"
            v-model="crudData.form" ref="crud" @on-load="onLoad">
        </avue-crud>
    </basic-container>
</template>
<script setup lang="ts" name="taskDetail">
import { reactive } from 'vue';
// import {getList} from "@/api/user/overview.js";
import TitleComponent from '@/components/title/index.vue';
import BasicContainer from '@/components/basic-container/main.vue';

let option: any = reactive({
    height: 'auto',
    calcHeight: 100,
    searchShow: true,
    searchMenuSpan: 6,
    tip: false,
    border: true,
    index: false,
    viewBtn: false,
    editBtn: false,
    delBtn: false,
    addBtn: false,
    dialogWidth: '40%',
    menuFixed: 'right',
    labelWidth: 130,
    gridBtn: false,
    menu: false,
    selection: true,
    searchLabelWidth: 110,
    indexLabel: '序号',
    saveBtnText: '确定',
    refreshBtn: true, // 刷新按钮
    columnBtn: false,
    searchShowBtn: false,
    indexWidth: 60,
    column: [
        {
            label: "ID",
            prop: "id",
            // search: true,
            sortable: true,
            span: 24,
        },
        {
            label: "用户账号",
            prop: "account",
            // search: true,
            span: 24,
        },
        {
            label: "奖品名称",
            prop: "test",
            span: 24,
        },
        {
            label: "抽奖方式",
            prop: "test1",
            span: 24,
        },
        {
            label: "抽奖时间",
            prop: "test2",
            span: 24,
        }
    ]
})
let crudData: any = reactive({
    loadingSubmit: false,
    loadingSave: false,
    index_unit: [],
    loading: true,
    active: 1,
    page: {
        pageSize: 10,
        currentPage: 1,
    },
    filedArr: [],
    data: []
})
const onLoad = () => {
    crudData.loading = false;
    crudData.data = [
        {
            id: '2',
            index: '662303',
            account: '4412349654',
            test: 'YouTube',
            test1: '1',
            test2: '2023-06-19 05:40:22',
        },
        {
            id: '5',
            index: '662301',
            account: '441223784',
            test: 'YouTube',
            test1: '1',
            test2: '2023-06-17 05:40:22',
        }
    ]
    crudData.page.total = crudData.data.length;

    // getList().then((res: any) => {
    //     console.log('getReviewLog--', res);
    //     const Data = res.data.data;
    //     // crudData.page.total = Data.total;
    //     crudData.logData = Data;
    //     crudData.loading = false;
    // });
}
</script>
<style scoped lang="scss"></style>